package disruptor;


import com.lmax.disruptor.EventHandler;

/**
 * @program: util
 * @description:
 * @author: zhouliangliang
 * @create: 2019-12-11 19:02
 **/
public class LongEventHandler implements EventHandler {

    @Override
    public void onEvent(Object event, long sequence, boolean endOfBatch) throws Exception {
        if(event instanceof LongEvent) {
            System.out.println("Event:" + ((LongEvent) event).getValue());
        } else {
            System.out.println("Event: " + event);
        }

    }
}
